const express = require('express')
const router = express.Router()
const expressJoi = require('@escook/express-joi')
const {update_volunteerinfo_schema,
       update_password_schema,
       update_avatar_schema
       } = require('../schema/teacher')


// 挂载路由
// 导入路由函数处理模块
const teacherinfo_handler = require('../router_handler/teacherinfo')
// 获取用户基本信息
router.get('/teacherinfo',teacherinfo_handler.getTeacherInfo)
// 更新用户基本信息
router.post('/teacherinfo',teacherinfo_handler.updateTeacherInfo)
// 重置密码的接口
router.post('/updatepwd/teacherpwd',expressJoi(update_password_schema),teacherinfo_handler.updatePassword)
// 更新头像
router.post('/update/teacheravatar',expressJoi(update_avatar_schema),teacherinfo_handler.updateAvatar)


module.exports = router